// pages/signlist/signlist.js
const app = getApp()

Page({


    /**
     * 页面的初始数据
     */
    data: {
        isteacher:true,
        courseId:'',
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        let signList = this;
        let userstatus = app.globalData.userstatus;
        let courseId = options.courseId;
        this.setData({
            courseId:courseId,
        });
        // console.log(userstatus);
        if(userstatus == 0){
            this.setData({
                isteacher:false,
            })
        }
        wx.request({
            url: 'http://localhost/public/sign/sign/signlist?courseId='+courseId,
            data: {},
            header: {'content-type':'application/json'},
            method: "GET",
            success: ({data}) => {
                console.log(data)
                signList.setData({
                    data:data,
                })
            },
        })
        // console.log(this.data)
    },

    
})